﻿namespace TimeSpan.Interfaces;

/// <summary>应用程序的消息提示服务接口</summary>
public interface IMessageService {

    /// <summary>提示一般消息</summary>
    /// <param name="message">消息内容</param>
    public Task MessageAsync(string message);

    /// <summary>提示一般消息</summary>
    /// <param name="message">消息内容</param>
    /// <param name="title">消息标题</param>
    public Task MessageAsync(string message, string title);

    /// <summary>提示成功消息</summary>
    /// <param name="message">消息内容</param>
    public Task SuccessAsync(string message);

    /// <summary>提示成功消息</summary>
    /// <param name="message">消息内容</param>
    /// <param name="title">消息标题</param>
    public Task SuccessAsync(string message, string title);

    /// <summary>提示警告消息</summary>
    /// <param name="message">消息内容</param>
    public Task WarnAsync(string message);

    /// <summary>提示警告消息</summary>
    /// <param name="message">消息内容</param>
    /// <param name="title">消息标题</param>
    public Task WarnAsync(string message, string title);

    /// <summary>提示错误消息</summary>
    /// <param name="message">消息内容</param>
    public Task ErrorAsync(string message);

    /// <summary>提示错误消息</summary>
    /// <param name="message">消息内容</param>
    /// <param name="title">消息标题</param>
    public Task ErrorAsync(string message, string title);

    /// <summary>弹窗提示消息</summary>
    /// <param name="message">消息内容</param>
    /// <param name="title">消息标题</param>
    public Task AlertAsync(string message, string title);

    /// <summary>弹窗提示消息</summary>
    /// <param name="message">消息内容</param>
    public Task AlertAsync(string message);

    /// <summary>确认操作</summary>
    /// <param name="message">消息内容</param>
    /// <returns>确认返回 true，否则返回 false</returns>
    public Task<bool> ConfirmAsync(string message);

    /// <summary>确认操作</summary>
    /// <param name="message">消息内容</param>
    /// <param name="title">消息标题</param>
    /// <returns>确认返回 true，否则返回 false</returns>
    public Task<bool> ConfirmAsync(string message, string title);

    /// <summary>包含"是"、"否"和"取消"的确认操作</summary>
    /// <param name="message">消息内容</param>
    /// <returns>是返回 true，否返回 false，取消返回 null</returns>
    public Task<bool?> ConfirmWithCancelAsync(string message);

    /// <summary>包含"是"、"否"和"取消"的确认操作</summary>
    /// <param name="message">消息内容</param>
    /// <param name="title">消息标题</param>
    /// <returns>是返回 true，否返回 false，取消返回 null</returns>
    public Task<bool?> ConfirmWithCancelAsync(string message, string title);

}